using Unity.Entities;
using UnityEngine;

namespace Game.Core
{
    public partial class InputSystem : SystemBase
    {
        protected override void OnUpdate()
        {
            if (Input.GetKeyUp(KeyCode.K))
            {
                Entities.WithAll<Damageable>()
                    .ForEach((Entity e, ref Damageable damageable) =>
                    {
                        damageable.Detail.CurHealthPoint -= 20f;
                    }).ScheduleParallel();
            }
        }
    }
}